package com.decent.manager.system.controller;

import com.decent.common.bo.MessageBean;
import com.decent.manager.system.dto.SystemOrderDTO;
import com.decent.manager.system.service.SystemOrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: decent Gjh
 * @date: 2022/11/02/8:48
 * @description:
 */
@RestController
@RequestMapping("/order")
public class SystemOrderController {
    private final SystemOrderService orderService;

    public SystemOrderController(SystemOrderService orderService) {
        this.orderService = orderService;
    }

    /**
     * 根据条件查询订单
     * @param systemOrderDTO 查询条件
     * @return 订单列表
     */
    @GetMapping
    public MessageBean selectOrderList(SystemOrderDTO systemOrderDTO){
        return orderService.selectOrderList(systemOrderDTO);
    }
}
